import java.util.Scanner;

public class Fect {
    public static void main(String[] args) {
        int n;
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        System.out.println(Fun.fect(n));
    }
}

class Fun {
    static int fect(int n) {
        if (n == 1) {
            return 1;
        } else {
            return n * fect(n - 1);
        }
    }
}
